<template>
    <div>
        <h1>这是孙子组件</h1>
        <h1>{{info}}</h1>

    </div>
</template>

<script lang="ts">
import { defineComponent, inject, Ref } from 'vue'

export default defineComponent({
    setup() {

        const num = inject<Ref<string>>("num")
        console.log(num?.value);

        const info = inject<Ref<string>>("info")
        console.log(info);
        console.log(info?.value);
        
        

        return {
            num,
        }
    }
})
</script>

<style scoped>

</style>